package com.indeep.user.mapper;

import com.indeep.user.mapper.po.AppUserPO;
import org.apache.ibatis.annotations.Select;

public interface AppUserMapper extends IndeepBaseMapper<AppUserPO> {
    @Select("SELECT " +
            "    IFNULL(TIMESTAMPDIFF(YEAR, STR_TO_DATE(birthday, '%Y-%m-%d'), curdate()), 18) AS age " +
            "FROM" +
            " app_user where id = #{id}")
    Integer selectAgeByBirthday(Long id);
}
